<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Test Page</title>
</head>
<body class="yui3-skin-sam">

<div id="log"></div>
<div id="test" style="visibility: hidden;">
    <a href="/foo/" id="link-foo">foo</a>
    <a href="assets/page-full.html" id="link-full">Full HTML page</a>
    <a href="assets/page-snippet.html" id="link-snippet">Snippet HTML page</a>
    <a href="assets/page-text.html" id="link-text">text page</a>
</div>
<iframe src="assets/app-iframe.html" id="test-iframe" style="visibility:hidden"></iframe>

<script src="../../../../build/yui/yui.js"></script>
<script>
    YUI.Env.CSRF_TOKEN = 'asdf1234';
</script>
<script>
var Y = YUI({
    filter  : (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw',
    coverage: ['app'],

    modules: {
        'app-test': {
            use: [
                'app-base-test',
                'app-content-test',
                'lazy-model-list-test',
                'model-test',
                'model-list-test',
                'model-sync-local-test',
                'model-sync-rest-test',
                'router-test',
                'view-test',
                'view-node-map-test'
            ]
        },

        'app-base-test': {
            fullpath: 'assets/app-base-test.js',
            requires: ['app-base', 'test']
        },

        'app-content-test': {
            fullpath: 'assets/app-content-test.js',
            requires: ['app-content', 'test']
        },

        'lazy-model-list-test': {
            fullpath: 'assets/lazy-model-list-test.js',
            requires: ['model-list', 'test']
        },

        'model-test': {
            fullpath: 'assets/model-test.js',
            requires: ['model', 'model-list', 'test']
        },

        'model-list-test': {
            fullpath: 'assets/model-list-test.js',
            requires: ['model-list', 'test']
        },

        'model-sync-local-test': {
            fullpath: 'assets/model-sync-local-test.js',
            requires: ['model', 'model-list', 'model-sync-local', 'test']
        },

        'model-sync-rest-test': {
            fullpath: 'assets/model-sync-rest-test.js',
            requires: ['model', 'model-list', 'model-sync-rest', 'test']
        },

        'router-test': {
            fullpath: 'assets/router-test.js',
            requires: ['router', 'test']
        },

        'view-test': {
            fullpath: 'assets/view-test.js',
            requires: ['model', 'model-list', 'view', 'test']
        },

        'view-node-map-test': {
            fullpath: 'assets/view-node-map-test.js',
            requires: ['view-node-map', 'test']
        }
    },
    useBrowserConsole: false
}).use('app-test', 'test-console', function (Y) {
    new Y.Test.Console().render('#log');
    Y.Test.Runner.add(Y.AppTestSuite);
    Y.Test.Runner.run();
});
</script>

</body>
</html>
